5 public static void main(String args
[]) throws Exception
{
6 BufferedReader cin
= new BufferedReader(new InputStreamReader(System
.in
));
8 BigInteger dp
[] = new BigInteger
[1010];
9 for (int i
=0; i
<1010; ++i
) dp
[i
] = BigInteger
.ZERO
;
10 dp
[0] = BigInteger
.ONE
;
11 for (int i
=0; i
<=1000; ++i
){
12 dp
[i
+1] = dp
[i
+1].add(dp
[i
]);
13 dp
[i
+1] = dp
[i
+1].add(dp
[i
]);
14 dp
[i
+2] = dp
[i
+2].add(dp
[i
]);
15 dp
[i
+3] = dp
[i
+3].add(dp
[i
]);
18 while ((s
= cin
.readLine()) != null){
19 System
.out
.println(dp
[Integer
.parseInt(s
)].toString());